The present invention relates to a semiconductor device and relates to, for example, a semiconductor device including an oscillation circuit that drives a crystal oscillator.
It is known that, in various semiconductor devices, an oscillation signal is produced by driving a crystal oscillator outside a chip by an oscillation circuit provided in the chip and used as a clock signal.
In order to diminish radiation noise that is generated by an oscillation circuit due to a high-frequency distortion component, it is necessary to decrease the gain of an inverting amplifier that is coupled to the crystal oscillator and reduce the amplitude level of an oscillation signal as small as possible. Note that the amplitude level of an oscillation signal means a “peak to peak” level of an oscillation signal and it will hereinafter be denoted by “Vp-p”.
On the other hand, if the gain of the inverting amplifier is set too small, it may lead to no oscillation. Thus, it is necessary to set the amplitude level Vp-p as large as possible to ensure oscillation allowance and S/N (signal-noise ratio).
In view of such a dilemma, it is desired to control the gain of the inverting amplifier so that the amplitude level Vp-p of an oscillation signal should be less than a power supply voltage VCC, whereas it should be as close to the power supply voltage VCC as possible.
An oscillator disclosed in Patent Document 1 includes an oscillation unit including a plurality of oscillation circuits with different degrees of oscillation allowance and a peak detecting unit that detects a peak output voltage (equivalent to the amplitude level Vp-p) that is output by the oscillation unit. Based on the amplitude level Vp-p detected by the peak detecting unit, one of the oscillation circuits is selected for use as an oscillation circuit to drive a crystal oscillator.
Patent Document 2 discloses a technique for adjusting the gain of an inverting amplifier in an oscillation circuit, based on the amplitude level Vp-p. This technique is, in principle, similar to the technique disclosed in Patent Document 1.
One-chip microcomputer disclosed in Patent Document 3 detects a high-frequency component from an oscillation signal and adjusts the gain of an inverting amplifier and the resistance of a damping resistor, based on a result of the detection.